# a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 取出 1，3，5，7，9 隔2个取值

a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

for x in a[::2]:        # 每隔2个取值
    print(x, end=" ")

print()
print('-' * 50)

# range 函数
# range(stop) -> range object
# range(start, stop[, step]) -> range object
for i in range(5):  # 等价于 range(0, 5)
    print(i)

print()
print('-' * 50)

for j in range(1, 15, 3):  # 间隔3
    print(j)
